import React, { Component } from 'react';

var Cesium = require('cesium/Cesium');
// import Cesium from 'cesium/Cesium';
  // import   "cesium/Cesium/Source/Widgets/widgets.css"; 

class App extends Component {  
    componentDidMount() {
        Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI5NTFhMDMwMi02YWVjLTRmNmItOThjNS00MDI1YTVkNjdhODciLCJpZCI6NTY0Miwic2NvcGVzIjpbImFzciIsImdjIl0sImlhdCI6MTU0MzgyNzA5MH0.4OIh4gPgWSceyKB4iHliAX59933ryNrXBwVut46WE78';
        this.viewer = new Cesium.Viewer(this.cesiumContainer );
        this.viewer.scene.camera.flyTo({
            destination: Cesium.Cartesian3.fromDegrees(115.47421577537116,38.87877832770917,149.8464368758723),
            orientation: {
                heading: 3.8455,
                pitch: -0.4535,
                roll: 0.0
            }
        });

    }

    render() {
        return (
            <div>
                <div id="cesiumContainer" ref={ element => this.cesiumContainer = element }/>
            </div>
        );
    }
}

export default App